package com.mz3co.sysadmin.service;

import java.io.OutputStream;
import java.util.List;
import java.util.Map;

import com.mz3co.sysadmin.model.SysCompany;
import com.mz3co.sysadmin.model.SysCustomer;
import com.mz3co.sysadmin.model.ex.SysCustomerEx;
 


public interface SysCustomerService {

	public String update(String customerJSON);
	public  String register(String customerJSON);
	
	public void exportExcel(SysCustomerEx customer,OutputStream  os);
	
	
	
	public SysCustomer getByCustomerName(String customerName);
	
	public SysCustomer getByCellPhone(String cellPhone);
	
	public SysCustomer getByEmail(String email);
	/**
	 * 返回制定cpmpanyIds下的客户姓名（客户Id）字符串。
	 * @param companyIds
	 * @return
	 */
	public String getCustomers(List<Integer> companyIds);
	
	public boolean isExistCellPhone(String cellPhone);
	
	public String setCounterman(String  ids,String employeeId);
	
	public String setVIP(String  ids,String type);
	 
	public SysCustomer getCustomer(Integer customerId);
	
	public Map<String,Object> getCusByPage(SysCustomerEx httpCustomer, Integer pageSize,
			Integer pageNow);
	
	/**
	 * 修改客户的单位信息，该方法会在以下2种情况调用
	 * 1、该方法会在修改单位全称时调用
	 * 2、将部分单位合并到某一个单位时调用
	 * @param customer
	 */
	public void updateCompanyFullname(SysCustomer customer);
		
	
	/**
	 * 该方法为更新客户方法，执行时需判断更新的客户名是否存在，如果不存在需插入新的单位信息
	 * @param customer
	 * @return
	 */
	public String update(SysCustomer customer);
	 
	/**
	 * 该方法为新增客户(嘉宾，客商)方法，执行时需自动添加客户所在的单位信息
	 * @param customer
	 * @return
	 */
	public String insert(SysCustomerEx customer);
	
	 
	/**
	 * 删除客户
	 * @param ids
	 * @return
	 */
	public String delete(String  ids);
	
//	public Integer getCusIDBySC(SysCustomer sysCustomer);
	
	public boolean isExistEmail(SysCustomer customer);
	
	public boolean isExistphone(SysCustomer customer);
	
}